<template>
  <div class="container">
    <div class="input">
      <el-form :model="loginForm" status-icon :rules="rules">
        <h1>请输入您的CAT-Key以享受我们提供的服务</h1>
        <el-form-item prop="catkey">
          <el-input
            v-model="loginForm.catkey"
            prefix-icon="el-icon-present"
            placeholder="XXXX-XXXX-XXXX-XXXX"
          ></el-input>
        </el-form-item>
        <el-button  @click="$router.replace('/catinfo/maininfo')">登录</el-button>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loginForm: {
        catkey: "",
      },
      rules: {
        catkey: [
          { required: true, message: "请输入您的CAT-Key", trigger: "blur" },
          { min: 19, max: 19, message: "CAT-Key格式输入错误", trigger: "blur" },
        ],
      },
    };
  },
};
</script>

<style lang="less" scoped>
.container {
  position: relative;
  height: 100%;
  .input {
    position: absolute;
    left: 50%;
    top: 50%;
    box-shadow: 1px 1px 1px gray;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60%;
    height: 50%;
    background-color: aliceblue;
    border-radius: 20px;
    .el-form h1 {
      color: pink;
    }
  }
  .el-button {
    background-color: #eea2a4;
    width: 100%;
    color: aliceblue;
    font-size: 20px;
    text-align: center;
  }
}
</style>